package com.ushio.capsuleservice.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 时间容器实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tc_container")
public class Container {
    // AI 修改：新增 category 字段以前端传入的分类数据为准。
    @TableField("category")
    private String category;

    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("user_id")
    private Long userId;

    @TableField("title")
    private String title;

    @TableField("description")
    private String description;

    @TableField("start_time")
    private LocalDateTime startTime;

    @TableField("end_time")
    private LocalDateTime endTime;

    @TableField("status")
    private Integer status = 1; // 1-进行中，2-已结束，0-已删除

    @TableField("effectiveness_score")
    private BigDecimal effectivenessScore; //有效评分

    @TableField("tags")
    private String tags;

    @TableField("created_time")  //todo 业务用的是strateTime
    private LocalDateTime createdTime;

    @TableField("updated_time")
    private LocalDateTime updatedTime;

    @TableField("elapsed_time")
    private Integer elapsedTime = 0; // 已计时秒数-实际用时


    @TableField("plan_id")
    private Long planId ; //所属计划id
}
